<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Home</title>
        <link href="assets/css/lib/themify-icons.css" rel="stylesheet">
        <link href="assets/css/lib/menubar/sidebar.css" rel="stylesheet">
        <link href="assets/css/lib/bootstrap.min.css" rel="stylesheet">
        <link href="assets/css/style.css" rel="stylesheet">
</head>
 <body>

        <div class="sidebar sidebar-hide-to-small sidebar-shrink sidebar-gestures">
            <div class="nano">
                <div class="nano-content">
                    <ul>
                        <div class="logo"><a href="index.jsp"><span>教务管理系统后台</span></a></div>
                        <li class="label">Main</li>
                        <%
                            if(request.getSession().getAttribute("identity")!=null){
                                int identity=(int)request.getSession().getAttribute("identity");
                                if(identity==3){
                        %>
                        <li><a class="sidebar-sub-toggle"><i class="ti-home"></i>用户管理 <span class="sidebar-collapse-icon ti-angle-down"></span></a>
                            <ul>
                                <li><a href="allUser.jsp">查看所有用户</a></li>
                            </ul>
                        </li>
                        <li><a class="sidebar-sub-toggle"><i class="ti-bar-chart-alt"></i>教师管理 <span class="sidebar-collapse-icon ti-angle-down"></span></a>
                            <ul>
                                <li><a href="allTeacher.jsp">查看所有教师</a></li>
                            </ul>
                        </li>
                        <li><a class="sidebar-sub-toggle"><i class="ti-home"></i>场地管理 <span class="sidebar-collapse-icon ti-angle-down"></span></a>
                            <ul>
                                <li><a href="allPlace.jsp">查看所有场地</a></li>
                            </ul>
                        </li>
                        <li><a class="sidebar-sub-toggle"><i class="ti-bar-chart-alt"></i>班级管理 <span class="sidebar-collapse-icon ti-angle-down"></span></a>
                            <ul>
                                <li><a href="allClass.jsp">查看所有班级</a></li>
                            </ul>
                        </li><%
                    }
                    else{%>
                        <li><a class="sidebar-sub-toggle"><i class="ti-bar-chart-alt"></i>课程管理 <span class="sidebar-collapse-icon ti-angle-down"></span></a>
                            <ul>
                                <li><a href="allCourse.jsp">查看所有课程</a></li>
                            </ul>
                        </li>
                        <li><a class="sidebar-sub-toggle"><i class="ti-bar-chart-alt"></i>学员管理 <span class="sidebar-collapse-icon ti-angle-down"></span></a>
                            <ul>
                                <li><a href="allStudent.jsp">查看所有学员</a></li>
                            </ul>
                        </li><%
                        }
                    }
                    else{
                    %>
                        <a href="<%=request.getContextPath()%>/enter">请登录</a>
                        <a href="<%=request.getContextPath()%>/register">免费注册</a><%
                        }
                    %>

                    </ul>
                </div>
            </div>
        </div>
        <div class="header">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-12">
                        <div class="dropdown dib">
                            <div class="header-icon" data-toggle="dropdown">
                                <span class="user-avatar"><%=request.getSession().getAttribute("userid") %>
                                    <i class="ti-angle-down f-s-10"></i>
                                </span>
                                <div class="drop-down dropdown-profile dropdown-menu dropdown-menu-right">
                                    <div class="dropdown-content-body">
                                        <ul>
                                            <li>
                                                <a href="#">
                                                    <i class="ti-settings"></i>
                                                    <span>Setting</span>
                                                </a>
                                            </li>

                                            <li>
                                                <a onclick='location="<%=request.getContextPath() %>/exit"'>
                                                    <i class="ti-power-off"></i>
                                                    <span>Logout</span>
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <script src="assets/js/lib/jquery.min.js"></script>
        <script src="assets/js/lib/jquery.nanoscroller.min.js"></script>
        <script src="assets/js/lib/menubar/sidebar.js"></script>
        <script src="assets/js/lib/preloader/pace.min.js"></script>
        <script src="assets/js/lib/bootstrap.min.js"></script>
        <script src="assets/js/lib/circle-progress/circle-progress.min.js"></script>
        <script src="assets/js/lib/circle-progress/circle-progress-init.js"></script>
    </body>
</html>